﻿@model UI.Models.Catalog.ItemsPerProductViewModel
@{
    ViewBag.Title = "Items per category";
}
<br />
<h1>@Model.Name</h1>
<table   cellpadding="0" cellspacing="0" >
    <thead>
        <tr class="gridHead">
              <td>
                Item ID
            </td>
            <td>
                Name
            </td>
            <td>
                price
            </td>
            <td>
                &nbsp;
            </td>
        </tr>
    </thead>
    <tbody>
        @foreach (var item in Model.Items)
        {
            <tr class="gridItem">
                <td>
                    @item.ItemId
                </td>
                <td>
                    @Html.ActionLink(item.Name, "ItemDetails", "Catalog", new { itemId = item.ItemId }, null)
                </td>
                <td>
                    @item.Price
                </td>
                <td>
                    <a href="@Url.Action("AddItem", "ShoppingCart", new { itemId = item.ItemId })"><img src="@Url.Content("~/images/buttonAdd.gif")" alt="Add to Shopping Cart"  style="border: 0"/></a>
                </td>
            </tr>
        }
    </tbody>
</table>
